print('Please enter the maximum value: ')
max_number = int(input('maximum: '))

def continuePlus(max_number):
  sum = 0
  for i in range(1, max_number + 1):
    sum += i
  return sum

def sum(max_number):
  return (1 + max_number) * max_number / 2

def middlePlus(max_number):
  sum = 0
  rest = max_number % 2
  middle = (max_number - 1) / 2 + 1
  if rest == 0:
    count = max_number / 2
    return (1 + max_number) * count
  count = (max_number - 1) / 2
  return (1 + max_number) * count + middle

def recursivelyPlus(max_number):
  if max_number == 1:
    return 1
  else:
    return max_number + continuePlus(max_number - 1)

print(middlePlus(max_number))
print(recursivelyPlus(max_number))
print(continuePlus(max_number))
print(sum(max_number))